package com.thf.model.product;

import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

import java.math.BigDecimal;

@Document(indexName = "product")
@Setting()
public class ProductModel {
    private Integer id ;
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
//    @Field(analyzer = "ik_smart",type = FieldType.Text)
//    @Field(type = FieldType.Keyword)
    private String productName;
    private BigDecimal normalPrice;
    private BigDecimal price;
    private String content;
    private String isShow;
    private String isRecommend;
    private String img;
    private String typeId;
    @Field(type = FieldType.Keyword)
    private String createTime;
    @Field(type = FieldType.Keyword)
    private String updateTime;
    private String remark;
    private String enable;
    private String whereShow;
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    private String productType;
    @Field(type = FieldType.Keyword)
    private String shelfTime;

    public ProductModel() {
    }

    public ProductModel(String productName, BigDecimal normalPrice, BigDecimal price, String content, String isShow, String isRecommend, String img, String typeId, String createTime, String updateTime, String remark, String enable, String whereShow, String productType, String shelfTime) {
        this.productName = productName;
        this.normalPrice = normalPrice;
        this.price = price;
        this.content = content;
        this.isShow = isShow;
        this.isRecommend = isRecommend;
        this.img = img;
        this.typeId = typeId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.remark = remark;
        this.enable = enable;
        this.whereShow = whereShow;
        this.productType = productType;
        this.shelfTime = shelfTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String name) {
        this.productName = name;
    }

    public BigDecimal getNormalPrice() {
        return normalPrice;
    }

    public void setNormalPrice(BigDecimal normalPrice) {
        this.normalPrice = normalPrice;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    public String getIsRecommend() {
        return isRecommend;
    }

    public void setIsRecommend(String isRecommend) {
        this.isRecommend = isRecommend;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getWhereShow() {
        return whereShow;
    }

    public void setWhereShow(String whereShow) {
        this.whereShow = whereShow;
    }

    public String getProductType() {
        return productType;
    }
    public void setProductType(String type) {
        this.productType = type;
    }

    public String getShelfTime() {
        return shelfTime;
    }

    public void setShelfTime(String shelfTime) {
        this.shelfTime = shelfTime;
    }
}
